package one.stand.service;

import com.github.vioao.wechat.bean.response.component.QueryAuthResponse;
import com.github.vioao.wechat.bean.response.component.wxa.template.TemplateListResponse;
import com.github.vioao.wechat.bean.response.sns.SnsTokenResponse;
import one.stand.model.ResultModel;
import one.stand.request.CompanyAccountRequest;

/**
 * @author: QIK
 * @CreateDate: 2019/5/9 10:21
 */
public interface ComponentService {
    /**
     * 获取第三方token
     * @return
     */
    String getComponentToken();



    /**
     * 小程序预授权code
     * @return
     */
    String createPreAuthCode();

    /**
     * 小程序授权链接
     * @param request
     * @return
     */
    ResultModel<String> componentloginpage(CompanyAccountRequest request);

    /**
     * 获取授权公众号信息
     * @param code
     * @return
     */
    QueryAuthResponse queryAuth(String code);


    /**
     * 获取授权方token
     * @param appid 授权方appid
     * @return
     */
    String getAuthorizerRefreshToken(String appid);

    /**
     * 刷新授权方token
     * @param appid
     * @return
     */
   String getAuthorizerToken(String appid);

    /**
     * 授权成功回调
     * @param request
     * @return
     */
    ResultModel componentCallBack(CompanyAccountRequest request);

    /**
     * 获取小程序信息
     * @param request
     * @return
     */
    ResultModel getAuthorizerInfo(CompanyAccountRequest request);

}
